grammar eas;


SYMBOL
	: ('a'..'z'|'A'..'Z') ('a'..'z'|'A'..'Z'|'0'..'9'|'_')+
	;
	
FULL_QUALIFIED_NAME
	: SYMBOL ('.' SYMBOL)+
	;
	
COMMENT
    :   ';' ~('\n'|'\r')* '\r'? '\n' {$channel=HIDDEN;}
    ;
WS
	:   ( ' '
        | '\t'
        | '\r'
        | '\n'
        ) {$channel=HIDDEN;}
    ;





/*
	Grammar
 */

/*modifier
	: '[' NAME '=' NAME (',' NAME '=' NAME)* ']'
	; */


package
	: '.package' (FULL_QUALIFIED_NAME | SYMBOL)
	;


attribute
	: '[' (SYMBOL | SYMBOL '=' SYMBOL) 
	   (',' (SYMBOL | SYMBOL '=' SYMBOL))* ']'
	;

struct_member
	: (FULL_QUALIFIED_NAME|SYMBOL) SYMBOL
	;

struct
	: attribute '.struct' SYMBOL '{' struct_member* '}'
	;


class_member_field
	: '.field' SYMBOL ':' SYMBOL '{' '}'
	;
	
class_member
	: attribute (class_member_field)
	;
	
	
class
	: attribute '.class' SYMBOL '{' class_member* '}'
	;


eas
	: (package | struct | class)*
	;




